package com.dq.service.messsge;

import com.dq.exception.customException.AdminException;
import com.dq.domain.message.oneself.ApprovalMessage;
import com.dq.domain.message.oneself.centre.ApprovalUserCentre;

/**
 * @author cf
 *
 * 岗位逻辑
 *
 */
public interface ApprovalMessageService {
    /**
     * 添加
     * @param orgOrderId 采购单ID
     * @return
     * @throws AdminException
     */
    public ApprovalMessage save(Long orgOrderId)  throws AdminException;

    public ApprovalMessage messageToBoss(Long orgOrderId)  throws AdminException;


    /**
     *修改
     * @param approvalMessage
     * @return
     * @throws AdminException
     */
    public ApprovalMessage update(ApprovalMessage approvalMessage) throws AdminException;


    /**
     * 添加 采购用户关联 基本属性配置
     * @param approvalUserCentre
     * @return
     * @throws AdminException 自定义异常
     */
    public ApprovalUserCentre objectCentreSaveBase(ApprovalUserCentre approvalUserCentre) throws AdminException;

    /**
     * // 给 仓库/财务 发消息
     * @param orgOrderId 采购单ID
     * @param i 常量角色集合 角标
     * @throws AdminException 自定义异常
     */
    public void messageToRole(Long orgOrderId, int i) throws AdminException;

    /**
     * 给 采购单下单人 发采购消息
     * @param orgOrderId 采购单ID
     * @throws AdminException 自定义异常
     */
    public void messageToBuyer(Long orgOrderId) throws AdminException;

}
